<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Setup Thunderbird: POP3/IMAP, SMTP and global ldap address book</title>
        <link rel="stylesheet" type="text/css" href="./css/markdown.css" />
    </head>
    <body>

    <div id="navigation">
    <a href="https://www.iredmail.org" target="_blank">
        <img alt="iRedMail web site"
             src="./images/logo-iredmail.png"
             style="vertical-align: middle; height: 30px;"
             />&nbsp;
        <span>iRedMail</span>
    </a>
    &nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><h1 id="setup-thunderbird-pop3imap-smtp-and-global-ldap-address-book">Setup Thunderbird: POP3/IMAP, SMTP and global ldap address book</h1>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>Check out the lightweight on-premises email archiving software developed by iRedMail team: <a href="https://spiderd.io/">Spider Email Archiver</a>.</p>
</div>
<div class="toc">
<ul>
<li><a href="#setup-thunderbird-pop3imap-smtp-and-global-ldap-address-book">Setup Thunderbird: POP3/IMAP, SMTP and global ldap address book</a><ul>
<li><a href="#create-new-mail-account">Create new mail account</a></li>
<li><a href="#configure-thunderbird-as-pop3-client">Configure Thunderbird as POP3 client</a></li>
<li><a href="#configure-thunderbird-as-imap-client">Configure Thunderbird as IMAP client</a></li>
<li><a href="#configure-thunderbird-to-send-mail-via-smtp">Configure Thunderbird to send mail via SMTP</a></li>
<li><a href="#use-openldap-as-global-ldap-address-book">Use OpenLDAP as Global LDAP Address Book</a></li>
</ul>
</li>
</ul>
</div>
<p>iRedMail provides POP3S (POP3 over TLS), IMAPS (IMAP over TLS), SMTPS (SMTP over TLS) for receiving and sending emails by default.</p>
<h2 id="create-new-mail-account">Create new mail account</h2>
<p>To create a new mail account with Thunderbird, please click menu: <code>File -&gt; New -&gt; Mail Account</code>.</p>
<p>Add your name, email address and password in this screen.</p>
<p><img alt="" src="./images/thunderbird/new.mail.account.png" /></p>
<p>Click continue, it will detect IMAP and SMTP server automatically.</p>
<p>Note:</p>
<ul>
<li>Login username must be full email address. You may want to click <code>Edit</code> to ensure it is correct.</li>
<li>If you want to use POP3 instead of IMAP, click "Edit" and change it to POP3 in this screen with port <code>110</code>, <code>STARTTLS</code>.</li>
<li>The automatic detection only works properly if the autoconfig/autodiscover DNS records have been created properly. More information about them can be found in tutroials:<ul>
<li><a href="https://docs.iredmail.org/iredmail-easy.autoconfig.autodiscover.html">Setup DNS records for autoconfig and autodiscover</a></li>
<li><a href="https://docs.iredmail.org/setup.dns.html">Setup DNS records for your iRedMail server</a></li>
</ul>
</li>
</ul>
<p><img alt="" src="./images/thunderbird/new.mail.account.setup.png" /></p>
<h2 id="configure-thunderbird-as-pop3-client">Configure Thunderbird as POP3 client</h2>
<p>Warning: Make sure you are using full email address as username.</p>
<p><img alt="" src="./images/thunderbird/pop3.png" /></p>
<h2 id="configure-thunderbird-as-imap-client">Configure Thunderbird as IMAP client</h2>
<p>Warning: Make sure you are using full email address as username.</p>
<p><img alt="" src="./images/thunderbird/imap.png" /></p>
<h2 id="configure-thunderbird-to-send-mail-via-smtp">Configure Thunderbird to send mail via SMTP</h2>
<p>Menu: Tools -&gt; Account settings... -&gt; Outgoing server (SMTP) -&gt; Choose the server you are using.</p>
<p>Warning: Make sure you are using full email address as username.</p>
<p><img alt="" src="./images/thunderbird/smtp.png" /></p>
<h2 id="use-openldap-as-global-ldap-address-book">Use OpenLDAP as Global LDAP Address Book</h2>
<p><strong>IMPORTANT NOTE</strong>: Thunderbird won\'t show contacts in LDAP address book directly, but it works when you starting typing email address in recipient field while composing email.</p>
<p>Here we take Thunderbird 5.0 for example. Steps:</p>
<ul>
<li>Click <code>Address Book</code> in main Thunderbird window.</li>
<li>In Address Book window, click menu <code>File -&gt; New -&gt; LDAP Directory</code>.</li>
<li>
<p>In tab <code>General</code>:</p>
<ul>
<li><code>Name</code>: use whatever name you like. e.g. Global LDAP Address Book.</li>
<li><code>Hostname</code>: IP address or hostname of your iRedMail server.</li>
<li><code>Base DN</code>: Base dn of your domain in LDAP directory. Normally, it's <code>domainName=domain.ltd,o=domains,dc=xxx,dc=xxx</code>. For example, <code>domainName=example.com,o=domains,dc=iredmail,dc=org</code>.</li>
<li><code>Port Number</code>: 389. <strong>Note</strong>: If you prefer to connect to OpenLDAP server over SSL, please check the <code>Use secure connection (SSL)</code> under same tab.</li>
<li><code>Bind DN</code>: It's full LDAP dn of your mail account. Normally, it's <code>mail=user@domain.ltd,ou=Users,domainName=domain.ltd,o=domains,dc=xxx,dc=xxx</code>. For example: <code>mail=john@example.com,ou=Users,domainName=example.com,o=domains,dc=iredmail,dc=org</code>.</li>
</ul>
</li>
<li>
<p>In tab <code>Advanced</code>:</p>
<ul>
<li><code>Don't return more than xxx results</code>: depends on how many accounts stored in same domain, you may want to increase or descrease it. Default value in 100.</li>
<li><code>Scope</code>: Subtree.</li>
<li><code>Search filter</code>: <code>(&amp;(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailList)(objectClass=mailAlias)(objectClass=mailUser)))</code></li>
<li><code>Login method</code>: <code>Simple</code>.</li>
</ul>
</li>
<li>
<p>Now switch to tab <code>Offline</code>, click button <code>Download Now</code> to test your settings. It will prompt to input password for this LDAP server, just type password of your mail account. With correct bind dn and password, it will display <code>Replicated succeeded</code>.</p>
</li>
</ul>
<p>That's all.</p><div class="footer">
    <p style="text-align: center; color: grey;">All documents are available in <a href="https://github.com/iredmail/docs/">GitHub repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://github.com/iredmail/docs/archive/master.zip">download the latest version</a> for offline reading. If you found something wrong, please do <a href="https://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
</div></body></html>